import type { Node } from "yoga-layout";
import { type CSSFlexDirection } from "@/utils/yoga-maps";

export type Width = Parameters<Node["setWidth"]>[0];
export type Height = Parameters<Node["setHeight"]>[0];
export interface FlexValues {
  flexGrow: number;
  flexShrink: number;
  flexBasis: string | number;
}

export interface Props {
  index?: number;
  id?: string;
  width?: Width;
  height?: Height;
  flexDirection?: CSSFlexDirection;
  x?: number;
  y?: number;
  display?: string;
  justifyContent?: string;
  alignContent?: string;
  alignItems?: string;
  flexWrap?: string;
  aspectRatio?: number;
  flex?: string;
  flexShrink?: number;
  flexGrow?: number;
  flexBasis?: string;
  position?: string;
  layoutDirection?: string;
  minWidth?: number;
  minHeight?: number;
  maxWidth?: number;
  maxHeight?: number;
  top?: number;
  left?: number;
  right?: number;
  bottom?: number;
  margin?: number;
  padding?: number;
  border?: number;
  alignSelf?: string;
  [key: string]: any; // 保留这个以允许其他未声明的属性
}
